import { buildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  //生产基地列表
  getBaseList: {
    url: '/api/v1/jt_base/get_base',
    method: 'get'
  },
  //新增基地
  addBase: {
    url: '/api/v1/jt_base/get_base',
    method: 'post'
  },
  //修改基地
  editBase: {
    url: '/api/v1/jt_base/get_base',
    method: 'put',
    type: 'restful'
  },
  //查看基地详情
  lookBaseDetail: {
    url: '/api/v1/jt_base/get_base',
    method: 'get',
    type: 'restful'
  },
  //删除基地
  delBase: {
    url: '/api/v1/jt_base/get_base',
    method: 'delete',
    type: 'restful'
  },
  // 获取生产订单列表数据-工业化生产管理
  getProductOrderData: {
    url: '/api/v1/jt_order/get_order',
    method: 'get'
  },
  //新增生产订单-工业化生产管理
  addProductOrder: {
    url: '/api/v1/jt_order/get_order',
    method: 'post'
  },
  //修改生产订单-工业化生产管理
  editProductOrder: {
    url: '/api/v1/jt_order/get_order',
    method: 'put',
    type: 'restful'
  },
  //查看订单详情
  getDetailOrder: {
    url: '/api/v1/jt_order/get_order',
    method: 'get',
    type: 'restful'
  },
  //删除订单
  delOrder: {
    url: '/api/v1/jt_order/get_order',
    method: 'delete',
    type: 'restful'
  },
  //获取生产构件列表数据
  getCompList: {
    url: '/api/v1/jt_component/get_component',
    method: 'get'
  },
  //添加生产构件
  addComponent: {
    url: '/api/v1/jt_component/get_component',
    method: 'post'
  },
  //编辑生产构件
  editComponent: {
    url: '/api/v1/jt_component/get_component',
    method: 'put',
    type: 'restful'
  },
  //生产构件详情
  getComponentDetail: {
    url: '/api/v1/jt_component/get_component',
    method: 'get',
    type: 'restful'
  },
  //删除构件
  delComponent: {
    url: '/api/v1/jt_component/get_component',
    method: 'delete',
    type: 'restful'
  },
  //添加明细
  addDetailed: {
    url: '/api/v1/jt_component/get_detailed',
    method: 'post',
    type: 'restful'
  },
  //查看明细
  lookDetailed: {
    url: '/api/v1/jt_component/get_detailed',
    method: 'get',
    type: 'restful'
  }
}
export default buildService(settings)
